package com.sunmouse.toollib.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Kvin on 2017/1/19.
 */
public class ListUtils {

    /**
     * judge whether a list is empty
     */
    public static <T> boolean isEmpty(List<T> list) {
        if (list == null || list.size() == 0) return true;
        return false;
    }

    public static <T> ArrayList<T> generateList(T[] arr) {
        ArrayList<T> list = new ArrayList<>();
        for (T t : arr) {
            list.add(t);
        }
        return list;
    }

}